<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>-.-</title>
    <link rel="stylesheet" href="{CSS}admin/reset.css">
    <link rel="stylesheet" href="{CSS}admin/bootstrap-admin.css">
    <link rel="stylesheet" href="{CSS}admin/backstage.css">
    <link rel="stylesheet" href="{CSS}public/page.css">
    <script src="{JS}public/jquery-1.8.3.min.js"></script>
    <script>pageurl="?m=admin&c=Adminc&a=admin_list";</script>
    <script src="{JS}public/page.js"></script>
</head>

<body>
<span class="main-title">管理员列表</span>
<div class="details">
    <div class="details_operation clearfix">
        <div class="bui_select">
            <input class="btn btn-primary"  type="button" value="添加管理员" class="add"  onclick="addAdmin()">
        </div>

    </div>
    <!--表格-->
    <div id="show">
    <table  class="table  table-hover">
        <thead>
        <tr>
            <th width="25%">管理员名称</th>
            <th width="30%">管理员邮箱</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $data as $key=>$val}
        <tr align="center">

            <td>{$val.username}</td>
            <td>{$val.email}</td>
            <td align="center"><a class="btn btn-link" onclick="editAdmin({$val.id})">修改</a><a class="btn btn-link" onclick="delAdmin({$val.id})">删除</a></td>
        </tr>
        {/foreach}

        </tbody>
    </table>
        {$page}
        <p align="center">共{$count}条数据</p>
    </div>
</div>
</body>
<script type="text/javascript">

    function addAdmin(){
        window.location="?m=admin&c=Adminc&a=index";
    }
    function editAdmin(id){
        window.location="?m=admin&c=Adminc&a=admin_edit&id="+id;
    }
    function delAdmin(id){
        if(window.confirm("您确定要删除吗？删除之后不可以恢复哦！！！")){
            window.location="?m=admin&c=Adminc&a=admin_delete&id="+id;
        }
    }
</script>
</html>